package com.xzx.flink.cep;

import java.util.StringJoiner;

/**
 * @version 1.0
 * @auther xinzhixuan
 * @date 2022/6/19 10:22
 */
public class LoginEvent {
    public String userId;
    public String ipAddress;
    public String eventType;
    public Long timestamp;

    public LoginEvent() {
    }

    public LoginEvent(String userId, String ipAddress, String eventType, Long timestamp) {
        this.userId = userId;
        this.ipAddress = ipAddress;
        this.eventType = eventType;
        this.timestamp = timestamp;
    }

    @Override
    public String toString() {
        return new StringJoiner(", ", LoginEvent.class.getSimpleName() + "[", "]")
                .add("userId='" + userId + "'")
                .add("ipAddress='" + ipAddress + "'")
                .add("eventType='" + eventType + "'")
                .add("timestamp=" + timestamp)
                .toString();
    }
}
